Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

599
Visualizações
Stripe API "No valid payment method types for this Payment Intent."

As you can imagine I´m currently setting up the payment API with using Stripe. Problem is, I´ve never done such thing before and am following the docs pretty much 1 by 1.

So I require stripe using (100% the right!) key.

const stripe = require("stripe")(
  "keyhere"
);

create the intent in a method...

const paymentIntent = stripe.paymentIntents.create({
  amount: process.env.AUDIT_PRICE,
  currency: "eur",
  automatic_payment_methods: { enabled: true },
});

call that method on a certain express route:

exports.createNewCashOrder = async (req, res) => {
  const intent = await paymentIntent();
  res.json({ client_secret: intent.client_secret });
};

The rest is irrelevant for now, since my backend server doesn´t even start on localhost. Actually it´s live for like 0.001 seconds and than crashes with this error:

StripeInvalidRequestError: No valid payment method types for this Payment Intent. Please ensure that you have activated payment methods compatible with your chosen currency in your dashboard

It also sends back a large error object, where at the end it says that pretty much everything (also the payment methods) are undefined.

error

Now on my dashboard, I did activate card payment, but it obviously somehow does not recognize it...

Any ideas what I´ve done wrong? Glad for any help, thanks!

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This is just a hunch but is your amount too small? https://stripe.com/docs/api/payment_intents/create#create_payment_intent-amount

If that is the case you get this error because you specified

automatic_payment_methods: {enabled: true}

Stripe is looking for a payment method that can handle an amount lower than the minimum so that's why you get this error. Try specifying a payment method and see if you get a different error message that indicates the amount is too low.

Remember the docs state the amount is represented as

A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda